<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="dome">
        异步请求
    </div>
    <button onclick="getText()">
        点击进行异步请求
    </button>
    <script>
        function getText() {
            var xtr=new XMLHttpRequest();
            xtr.open("GET","https://mock.apipost.cn/app/mock/project/a01ae067-dd87-4b24-a079-247ae486dcd7/address/list",true)
            xtr.send();
            xtr.onreadystatechange=function(){
                if (xtr.readyState==4) {
                    //console.log(xtr.responseText);
                    document.getElementById("dome").innerHTML=xtr.responseText;
                }
            }
        }
    </script>
</body>
</html>